<?php 
header("Content-type: text/html; charset=utf-8");
$admins =@mysql_connect('localhost','root','')
      or die('数据库无法连接');
mysql_set_charset('utf8');
@mysql_select_db('neu-video',$admins)
      or die('数据库不存在');
$sql = 'select * from admins';
$result = mysql_query($sql,$admins);
$admins = fetch_array($result);
echo '<table border="1">';
echo '<caption>用户管理</caption>';
echo '<tr>
<th>管理员ID</th>
<th>管理员名</th>
<th>密码</th>
</tr>';
foreach ($admins as $one) {
	echo '<tr>';
	echo '<td>'.$one['adminid'].'</td>';
	echo '<td>'.$one['adminname'].'</td>';
    echo '<td>'.$one['password'].'</td>';
	echo '</tr>';
}
function fetch_array($Results)
{
	$arrs = array();
    while ($Results && ($row = mysql_fetch_assoc($Results))!==FALSE) {
	       $arrs[] = $row;
          }
    return $arrs;
}
 ?>

